/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package core

// CryptoSuiteConfig 创建csp的配置接口
type CryptoSuiteConfig interface {
	IsSecurityEnabled() bool   // 是否开启加密
	SecurityAlgorithm() string // 指定加密函数
	SecurityLevel() int        // 加密等级
	SecurityProvider() string  // sw或者国密gm
	KeyStorePath() string      // 密钥保存路径
}

// Providers  提供了加密以及签名
type Providers interface {
	CryptoSuite() CryptoSuite
	SigningManager() SigningManager
}

type ConfigProvider struct {
	Id   string
	Func func() ([]ConfigBackend, error)
}

type ConfigBackend interface {
	Lookup(key string) (interface{}, bool)
}
